package ltd.ninefish.framework.log.service;

import ltd.ninefish.framework.core.constant.SecurityConst;
import ltd.ninefish.framework.systemapi.dto.SysOperLogDto;
import ltd.ninefish.framework.systemapi.service.RemoteLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author zhaoxiubin
 * create-time 2024-01-20 17:18
 * description 异步调用日志服务
 **/
@Service
public class AsyncLogService {
    @Autowired
    private RemoteLogService remoteLogService;

    /**
     * 保存系统日志记录
     */
    @Async
    public void saveSysLog(SysOperLogDto sysOperLog)
    {
        remoteLogService.saveLog(sysOperLog, SecurityConst.INNER);
    }
}
